-
Notifications
You must be signed in to change notification settings - Fork 111
fix(l1): use 256 bits for gas price in Legacy and EIP-2930 transactions #4823
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Benchmark Results ComparisonNo significant difference was registered for any benchmark run. Detailed ResultsBenchmark Results: BubbleSort
Benchmark Results: ERC20Approval
Benchmark Results: ERC20Mint
Benchmark Results: ERC20Transfer
Benchmark Results: Factorial
Benchmark Results: FactorialRecursive
Benchmark Results: Fibonacci
Benchmark Results: FibonacciRecursive
Benchmark Results: ManyHashes
Benchmark Results: MstoreBench
Benchmark Results: Push
Benchmark Results: SstoreBench_no_opt
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Switch Legacy and EIP-2930 transaction gas_price from 64-bit to 256-bit to align with the spec and enable handling of high gas prices.
- Change gas_price type to U256 for Legacy and EIP-2930 transactions and update migrations/serde accordingly.
- Update effective_gas_price and total_cost calculations to operate on U256.
- Adjust tests, helpers, and VM/backend paths; remove u64 casting where no longer needed.
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 7 comments.
Show a summary per file
File | Description |
---|---|
tooling/migrations/src/utils.rs | Convert stored gas_price to U256 during migration. |
tooling/ef_tests/state_v2/src/modules/runner.rs | Use U256 gas_price from test vectors for Legacy/EIP-2930. |
tooling/ef_tests/blockchain/types.rs | Keep gas_price as U256 when converting from generic Transaction. |
tooling/ef_tests/blockchain/tests/all.rs | Update skip list comment; remove skip for high gas price test. |
crates/vm/levm/runner/src/input.rs | Pass through U256 gas_price directly. |
crates/vm/backends/levm/mod.rs | Stop converting effective_gas_price to U256 as it now returns U256. |
crates/networking/rpc/types/receipt.rs | Fetch effective_gas_price from tx; currently downcasts to u64. |
crates/networking/rpc/eth/mod.rs | Update test helper to produce U256 gas_price. |
crates/common/types/transaction.rs | Change gas_price to U256 in Legacy/EIP-2930, compute effective gas price and total cost with U256, and update serde and helpers. |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Motivation
Description
Spec defines that legacy and eip 2930 txs should use 256 bits, we were using 64 bits.
Closes #3629